SDK_DIR = /home/yansu/duo_work/duo-buildroot-sdk
KERN_DIR = $(SDK_DIR)/linux_5.10/build/cv1800b_milkv_duo_sd
CROSS_COMPILE= /home/yansu/riscv_tools/host-tools/gcc/riscv64-linux-musl-x86_64/bin/riscv64-unknown-linux-musl-
ARCH = riscv
export CROSS_COMPILE ARCH
all:
	make -C $(KERN_DIR) M=/home/yansu/duo_work/myapp/oled_iic modules
	$(CROSS_COMPILE)gcc oledapp.c -o oledapp -Wall -pthread -O2 -static
.PHONE:clean

clean:
	make -C $(KERN_DIR) M=/home/yansu/duo_work/myapp/oled_iic clean
obj-m += oled.o